#include <iostream>
using namespace std;
typedef long long ll;
int x1, x2, y1, y2;
int main(){
	cin >> x1 >> y1 >> x2 >> y2;
	int dx = x1 - x2, dy = y1 - y2;
	if (dx != 0){
		cout << x1 << " " << y1 + 2 << endl;
	}
	else {
		cout << x1 + 2 << " " << y1 << endl;
	}

    return 0;
}


